package com.zhiyin.seal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhiyin.seal.entity.ElectronicFenceDetailEntity;
import com.zhiyin.seal.entity.ElectronicFenceEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface ElectronicFenceDao extends BaseMapper {

    Integer insertElectronicFence(@Param("elec") ElectronicFenceEntity electronicFenceEntity);

    Integer insertElectronicFenceDetail(@Param("elecId") Long elecId,@Param("sealIds") List<Long> sealIds);

    ElectronicFenceEntity selectCompanyElectronicFenceById(@Param("electronicFenceId") Long electronicFenceId);

    List<ElectronicFenceEntity> selectCompanyElectronicFenceList(@Param("companyId") Long companyId);

    List<ElectronicFenceEntity> selectElectronicFenceListBySeal(@Param("sealId") Long sealId);

    List<ElectronicFenceDetailEntity> selectElectronicFenceDetailList(@Param("electronicFenceId") Long electronicFenceId);

    Integer deleteElectronicFenceBySealId(@Param("sealId") Long sealId);

    Integer deleteElectronicFenceById(@Param("electronicFenceId") Long electronicFenceId);
}
